 import {useLocation} from 'react-router-dom'
 
 //封装解析search函数
 function useQuerySearch() {
    const {search}= useLocation();
    const obj = {};
    search.slice(1).split('&').forEach(item => {
    const [key, value] = item.split('=');
        obj[key] = value;
})
    return obj;
}

export { useQuerySearch };